import createHeading from './heading.js'

const heading = createHeading()

import png from '../public/1.jpeg'


document.body.append(heading)

// let img = new Image()

// img.src  = png

// document.body.append(img)

// ----------------------------------------

let ul = document.createElement('ul')
document.body.append(ul)

fetch('/api/users')
    .then(res => res.json())
    .then(res => {
        res.map(item => {
            console.log(item.login)
            let li = document.createElement('li')
            li.textContent = item.login
            ul.append(li)
        })
    })